package cc.atliberty.creating.simplefactory.simplefactory1;

import java.util.Arrays;

/**
 * 面向接口编程
 */
public class Client {
    public static void main(String[] args) {
        IFruit[] fruits = {new Grape(), new Strawberry()};
        Arrays.stream(fruits).forEach(fruit -> {
            fruit.plant();
            fruit.harvest();
        });
    }
}
